@extends('admin_system/public/layout')
@section('content')
    <div class="col-xs-12 nav top-nav">
        <p class="float-left nav-path"><strong>当前位置：</strong>分会>>报单列表</p>

        {{--<a class="btn-default btn float-right back ml10" href="{{asset('admin_system/chapter/prisidentEdit')}}">返回</a>--}}
        <a class="btn-default btn float-right reload">刷新</a>
    </div>

    <div class="content-box col-xs-12 mt20 pb20 pt20">
        <table class="table table-bordered table-hover">
            <tr class="active">
                <th>订单编号</th>
                <th>订单类型</th>
                <th>报单人</th>
                <th>新会员</th>
                <th>所属分会</th>
                <th>报单金额</th>
                <th>订单状态</th>
                <th>时间</th>
                <th></th>
            </tr>


            @foreach($orders as $order)

                <tr>
                    <td>{{$order->chapter_order_id}}</td>
                    @if( $order->is_upgrade == 1 )
                        <td>【 <span class='btn-danger'>升级</span>】{{$order->memberTypeName}}</td>
                    @else
                        <td>【 <span>新购</span>】{{$order->memberTypeName}}</td>
                    @endif

                    <td>{{$order->YourName}}</td>
                    <td>{{$order->new_member_name}}{{$order->new_company_name}}</td>
                    <td>{{$order->chapter_name}}</td>
                    <td>{{$order->total_money}}</td>
                    <td>
                        @if($order->company_check_status == 0)

                            <span class="btn-danger btn-xs">未审核</span>
                        @elseif($order->company_check_status == 1)
                            <span class="btn-default btn-xs">审核通过</span>
                        @else
                            <span class="btn-warning btn-xs">审核未通过</span>
                        @endif
                    </td>
                    <td>{{$order->add_time}}</td>
                    <td>

                        {{--<a href="{{asset('admin_system/chapter/officerEditIndex?officerId='.$order->chapter_order_id)}}">编辑</a>--}}
                        <a class="btn btn-xs btn-info" href="{{asset('admin_system/chapter/orderDetail?orderId='.$order->chapter_order_id)}}">查看详情</a>
                        <a class="btn btn-xs btn-danger" href="{{asset('admin_system/chapter/orderDelete?orderId='.$order->chapter_order_id)}}" onclick="javascript:return confirm('确定删除吗？')">删除</a>
                    </td>
                </tr>

            @endforeach
        </table>


        {!! $orders->appends(['keywords'=>''])->links() !!}
    </div>
@endsection
